//== SAGITTARIUS ============================================================================

//== BEGINNING OF CODE ===============================================================

#ifndef __SAGUTTARUIS__DUMBALLOC__H_
#define __SAGUTTARUIS__DUMBALLOC__H_

//== INCLUDES ========================================================================

#include "sagittarius/core/SagittariusCore.h"
#include "sagittarius/mem/span.h"
#include <stddef.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
    /// Number
    size_t n;
    /// Capacity
    size_t c;
    void** a;
} dumballoc_list;

void dumballoc_init(dumballoc_list* d);

void* dumballoc(dumballoc_list* d, size_t s);

void dumbfree(dumballoc_list* d);

#ifdef __cplusplus
}//extern "C"
#endif

#endif
